package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.YzrMedDrawDet;

public interface IYzrMedDrawDetDAO extends CrudRepository<YzrMedDrawDet, String> {

	@Query("select max(ymdd.medDrawDetId) from YzrMedDrawDet ymdd where ymdd.medDrawDetId like ?1%")
	public String findMaxId(String a);
	
	@Query("select ymdd from YzrMedDrawDet ymdd where ymdd.drawDetDrawId=?1")
	public List<YzrMedDrawDet> findDrawDetByDrawId(String medDrawId, Pageable pageable);
	
	@Query("select ymdd from YzrMedDrawDet ymdd where ymdd.drawDetDrawId=?1")
	public List<YzrMedDrawDet> findDrawDetByDrawId2(String medDrawId);
}
